/**
 * 
 */
package com.lehecai.core.lottery;

import com.lehecai.core.IntegerBeanLabelItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * 跟单状态类型
 * @author zhangzq
 * 
 */
public class FollowOrderStatusType extends IntegerBeanLabelItem {


	private static final long serialVersionUID = -530998782071935781L;

	private static final Logger logger = LoggerFactory.getLogger(FollowOrderStatusType.class.getName());

	private static List<FollowOrderStatusType> items = new ArrayList<FollowOrderStatusType>();

	protected FollowOrderStatusType(String name, int value) {
		super(FollowOrderStatusType.class.getName(), name, value);
		items.add(this);
	}
	
	public static FollowOrderStatusType getItem(int value){
		try {
			return (FollowOrderStatusType) FollowOrderStatusType.getResult(FollowOrderStatusType.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<FollowOrderStatusType> getItems() {
		return items;
	}
    public static final FollowOrderStatusType ALLOW = new FollowOrderStatusType("可跟单", 0);
	public static final FollowOrderStatusType NOTALLOW = new FollowOrderStatusType("不可跟单", 1);

}
